#pragma once
#include "CBaseObject.h"

// keep powers of two
// once there are 16+ enemies, the spawner needs to go from USHORT to UINT
enum EnemyType { ENEMY_SPAWNER = 0, ENEMY_BASE = 1};

class CRetroInput;
class CDirect3D;
class CPlayerObject;
class CEnemySpawner;
class CBaseEnemy : public CBaseObject
{
private:	
	CPlayerObject* m_pPlayerTarget;
	CEnemySpawner* m_pOwnedSpawner;
public:
	CBaseEnemy(void);
	~CBaseEnemy(void);

	void Initialize();
	void Initialize(int posX, int posY, float depth, int collisionWidth, int collisionHeight, CPlayerObject* pTarget);
	void Input(CRetroInput* pInput);
	void Update(float fDeltaTime);
	void Render(CDirect3D* pRender, CCamera* pCamera);
	void Destroy();
	bool CheckCollision(IBaseObject* pObject);
	inline ObjectType Type() { return OBJECT_ENEMY;}
	virtual inline EnemyType EType() { return ENEMY_BASE;}
	void SetSpawnOwner(CEnemySpawner* pOwner);

};

